package com.bpz.main.model;

/**
 * Created by 半瓶子 on 2/8/15.
 * blog: xusir.cnblogs.com
 */
public class Page {
    public Page(int pageIndex, int perPageRecord) {

        this.pageIndex = pageIndex;
        this.perPageRecord = perPageRecord;
        if (pageIndex != 0 && perPageRecord != 0) {
            startRecord = (pageIndex - 1) * perPageRecord;
        }
    }

    /**
     * 开始记录的索引
     */
    private int startRecord;
    /**
     * 每页要显示的记录数
     */
    private int perPageRecord;

    /**
     * 页码
     */
    private int pageIndex;
    /**
     * 查询的条件
     */
    private Object condition;

    public int getStartRecord() {
        return startRecord;
    }


    public int getPerPageRecord() {
        return perPageRecord;
    }

    public void setPerPageRecord(int perPageRecord) {
        this.perPageRecord = perPageRecord;
    }

    public Object getCondition() {
        return condition;
    }

    public void setCondition(Object condition) {
        this.condition = condition;
    }
}
